<template>
	<view>
		<Article :data="items" :item="'记录'"></Article>
	</view>
</template>

<script>
	import {mapMutations,mapState} from 'vuex';
	export default {
		data() {
			return {
				items:[]
			}
		},
		onLoad() {
			this.followInit();
		},
		methods: {
			followInit(){
				// console.log(this.userInfo);
				// console.log(this.articleList)
				for(let i=0;i<this.userInfo.like_article.length;i++){
					// console.log('bbb')
					for(let j=0;j<this.articleList.length;j++){
						// console.log('ccc')
						if(this.userInfo.like_article[i]==this.articleList[j]._id){
							this.items.push(this.articleList[j]);
							// console.log('aaa')
						}
					}
				}
			}
		},
		computed:{
			...mapState(['userInfo','articleList'])
		}
	}
</script>

<style>

</style>
